3.42 \(\int (c+d x) \cot (a+b x) \csc (a+b x) \, dx\)

Optimal. Leaf size=30 \[ -\frac{d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac{(c+d x) \csc (a+b x)}{b} \]

[Out]

-((d*ArcTanh[Cos[a + b*x]])/b^2) - ((c + d*x)*Csc[a + b*x])/b

________________________________________________________________________________________

Rubi [A]  time = 0.0195758, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {4410, 3770} \[ -\frac{d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac{(c+d x) \csc (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-((d*ArcTanh[Cos[a + b*x]])/b^2) - ((c + d*x)*Csc[a + b*x])/b

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x) \cot (a+b x) \csc (a+b x) \, dx &=-\frac{(c+d x) \csc (a+b x)}{b}+\frac{d \int \csc (a+b x) \, dx}{b}\\ &=-\frac{d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac{(c+d x) \csc (a+b x)}{b}\\ \end{align*}

Mathematica [B]  time = 0.0584151, size = 131, normalized size = 4.37 \[ \frac{d \log \left (\sin \left (\frac{a}{2}+\frac{b x}{2}\right )\right )}{b^2}-\frac{d \log \left (\cos \left (\frac{a}{2}+\frac{b x}{2}\right )\right )}{b^2}-\frac{c \csc (a+b x)}{b}-\frac{d x \csc (a)}{b}+\frac{d x \csc \left (\frac{a}{2}\right ) \sin \left (\frac{b x}{2}\right ) \csc \left (\frac{a}{2}+\frac{b x}{2}\right )}{2 b}-\frac{d x \sec \left (\frac{a}{2}\right ) \sin \left (\frac{b x}{2}\right ) \sec \left (\frac{a}{2}+\frac{b x}{2}\right )}{2 b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Cot[a + b*x]*Csc[a + b*x],x]

[Out]

-((d*x*Csc[a])/b) - (c*Csc[a + b*x])/b - (d*Log[Cos[a/2 + (b*x)/2]])/b^2 + (d*Log[Sin[a/2 + (b*x)/2]])/b^2 + (
d*x*Csc[a/2]*Csc[a/2 + (b*x)/2]*Sin[(b*x)/2])/(2*b) - (d*x*Sec[a/2]*Sec[a/2 + (b*x)/2]*Sin[(b*x)/2])/(2*b)

________________________________________________________________________________________

Maple [A]  time = 0.024, size = 52, normalized size = 1.7 \begin{align*} -{\frac{dx}{b\sin \left ( bx+a \right ) }}+{\frac{d\ln \left ( \csc \left ( bx+a \right ) -\cot \left ( bx+a \right ) \right ) }{{b}^{2}}}-{\frac{c}{b\sin \left ( bx+a \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x)

[Out]

-1/b*d/sin(b*x+a)*x+1/b^2*d*ln(csc(b*x+a)-cot(b*x+a))-1/b*c/sin(b*x+a)

________________________________________________________________________________________

Maxima [B]  time = 1.09171, size = 350, normalized size = 11.67 \begin{align*} -\frac{\frac{{\left (4 \,{\left (b x + a\right )} \cos \left (b x + a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 4 \,{\left (b x + a\right )} \cos \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) +{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) -{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 4 \,{\left (b x + a\right )} \sin \left (b x + a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b} + \frac{2 \, c}{\sin \left (b x + a\right )} - \frac{2 \, a d}{b \sin \left (b x + a\right )}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/2*((4*(b*x + a)*cos(b*x + a)*sin(2*b*x + 2*a) - 4*(b*x + a)*cos(2*b*x + 2*a)*sin(b*x + a) + (cos(2*b*x + 2*
a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1)
- (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*c
os(b*x + a) + 1) + 4*(b*x + a)*sin(b*x + a))*d/((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 - 2*cos(2*b*x + 2*a)
+ 1)*b) + 2*c/sin(b*x + a) - 2*a*d/(b*sin(b*x + a)))/b

________________________________________________________________________________________

Fricas [B]  time = 0.488275, size = 181, normalized size = 6.03 \begin{align*} -\frac{2 \, b d x + d \log \left (\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) \sin \left (b x + a\right ) - d \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \sin \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="fricas")

[Out]

-1/2*(2*b*d*x + d*log(1/2*cos(b*x + a) + 1/2)*sin(b*x + a) - d*log(-1/2*cos(b*x + a) + 1/2)*sin(b*x + a) + 2*b
*c)/(b^2*sin(b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right ) \cos{\left (a + b x \right )} \csc ^{2}{\left (a + b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)**2,x)

[Out]

Integral((c + d*x)*cos(a + b*x)*csc(a + b*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.52748, size = 1081, normalized size = 36.03 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a)*csc(b*x+a)^2,x, algorithm="giac")

[Out]

1/2*(b*d*x*tan(1/2*b*x)^2*tan(1/2*a)^2 + b*c*tan(1/2*b*x)^2*tan(1/2*a)^2 + b*d*x*tan(1/2*b*x)^2 - d*log(4*(tan
(1/2*a)^2 + 1)/(tan(1/2*b*x)^4*tan(1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(
1/2*b*x)^2 - 2*tan(1/2*b*x)*tan(1/2*a) + 1))*tan(1/2*b*x)^2*tan(1/2*a) + d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b
*x)^4 + 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a)
 + tan(1/2*a)^2))*tan(1/2*b*x)^2*tan(1/2*a) + b*d*x*tan(1/2*a)^2 - d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4*
tan(1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(1/2*b*x)*tan
(1/2*a) + 1))*tan(1/2*b*x)*tan(1/2*a)^2 + d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^3*tan(1/
2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2))*tan(1/2*b*x)*
tan(1/2*a)^2 + b*c*tan(1/2*b*x)^2 + b*c*tan(1/2*a)^2 + b*d*x + d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4*tan(
1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 - 2*tan(1/2*b*x)*tan(1/2
*a) + 1))*tan(1/2*b*x) - d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*
x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2))*tan(1/2*b*x) + d*log(4*(tan(1/
2*a)^2 + 1)/(tan(1/2*b*x)^4*tan(1/2*a)^2 - 2*tan(1/2*b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2
*b*x)^2 - 2*tan(1/2*b*x)*tan(1/2*a) + 1))*tan(1/2*a) - d*log(4*(tan(1/2*a)^2 + 1)/(tan(1/2*b*x)^4 + 2*tan(1/2*
b*x)^3*tan(1/2*a) + tan(1/2*b*x)^2*tan(1/2*a)^2 + tan(1/2*b*x)^2 + 2*tan(1/2*b*x)*tan(1/2*a) + tan(1/2*a)^2))*
tan(1/2*a) + b*c)/(b^2*tan(1/2*b*x)^2*tan(1/2*a) + b^2*tan(1/2*b*x)*tan(1/2*a)^2 - b^2*tan(1/2*b*x) - b^2*tan(
1/2*a))